<!DOCTYPE html>
<html lang="cn" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>互联网村镇管理平台</title>
    <link rel="stylesheet" type="text/css" th:href="@{/css/common.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/css/main.css}" />
</head>
<body>
    <div class="container clearfix">
        <!--/sidebar-->
        <div class="main-wrap">
            <div class="crumb-wrap">
                <div class="crumb-list">
                    <i class="icon-font">&#xe9bc;</i>
                    <a href="javascript:void(0);">旅游指导</a>
                    <span class="crumb-step">&gt;</span>
                    <span class="crumb-name">酒店美食</span>
                </div>
            </div>
            <div class="search-wrap">
                <div class="search-content">
                    <form th:action="@{/hotel/list}" method="post" id="queryForm">
                        <table class="search-tab" style="margin-left: 10px;">
                            <tr>
                            	<th width="70">酒店类型:</th>
                                <td>
                                    <select name="type" style="height: 30px; width: 80px;" onchange="javascript:$('#queryForm').submit();">
                                        <option value="-1">全部</option>
                                        <option value="1" th:selected="${type == '1'}">酒店</option>
                                        <option value="2" th:selected="${type == '2'}">民宿</option>
                                    </select>
                                </td>
                                <th width="110">酒店名称:</th>
                                <td>
                                    <input class="common-text" placeholder="酒店名称" name="title" th:value="${title }" type="text" />
                                </td>
                                <th width="110">酒店简介:</th>
                                <td>
                                    <input class="common-text" placeholder="酒店简介" name="desc" th:value="${desc }" type="text" />
                                </td>
                                <th width="110">酒店描述:</th>
                                <td>
                                    <input class="common-text" placeholder="酒店描述" name="content" th:value="${content }" type="text" />
                                </td>
                                <td>
                                    <input class="btn btn-primary btn2" name="sub" value="查询" type="submit">
                                </td>
                            </tr>
                        </table>
                    </form>
                </div>
            </div>
            <div class="result-wrap">
                <div class="result-title" th:if="${status==2}">
                    <div class="result-list">
                        <a th:href="@{/hotel/addHotel}" href=""><i class="icon-font">&#xea0a;</i>新增酒店</a>
                        <a id="batchDel" href="javascript:batchDeleteHotels();"><i class="icon-font">&#xe9ac;</i>批量删除</a>
                    </div>
                </div>
                <div class="result-content">
                    <table class="result-tab" width="100%">
                        <tr>
                            <th class="tc" width="5%"><input class="allChoose" onclick="javascript:shiro.form.setCheckBoxSelectToggle('hotelIdCheckBox');" type="checkbox" /></th>
                            <th width="15%">酒店名称</th>
                            <th width="15%">酒店简介</th>
                            <th width="15%">酒店描述</th>
                            <th width="15%">酒店特征</th>
                            <th width="10%">酒店位置</th>
                            <th width="10%">酒店类型</th>
                            <th width="15%">添加时间</th>
                            <!--<th>更新时间</th>-->
                            <th class="tc" width="10%">操作</th>
                        </tr>
                        <tr th:each="hotel:${hotelInfoList}">
                            <td class="tc">
                                <input name="hotelIdCheckBox" th:value="${hotel?.hotelId }" type="checkbox" />
                            </td>
                            <td th:text="${hotel?.title }"></td>
                            <td th:text="${hotel?.desc }"></td>
                            <td th:text="${hotel?.content }"></td>
                            <td th:text="${hotel?.feature }"></td>
                            <td th:text="${hotel?.address }"></td>
                            <td th:text="${hotel?.type==1?'酒店':'民宿'}"></td>
                            <td th:text="${#dates.format(hotel?.createTime,'yyyy-MM-dd HH:mm:ss')}"></td>
                            <!--<td th:text="${#dates.format(hotel?.updateTime,'yyyy-MM-dd HH:mm:ss')}"></td>-->
                            <td class="tc" th:if="${hotel.status==2}">
                                <a class="link-update" th:href="@{'/hotel/editHotel/' + ${hotel?.hotelId}}">修改</a>
                                <a class="link-del" th:href="'javascript:deleteHotel(\'' + ${hotel?.hotelId } + '\');'">删除</a>
                            </td>
                            <td class="tc" th:if="${hotel.status==1}">
                                <a class="link-update" th:href="'javascript:adoptHotel(\'' + ${hotel?.hotelId } + '\');'">通过</a>
                                <a class="link-del" th:href="'javascript:rejectHotel(\'' + ${hotel?.hotelId } + '\');'">驳回</a>
                            </td>
                            <td class="tc" th:if="${hotel.status==3}">
                                <a class="link-update" th:href="'javascript:viewHotel(\'' + ${hotel?.hotelId } + '\');'">查看</a>
                                <a class="link-del" th:href="'javascript:deleteHotel(\'' + ${hotel?.hotelId } + '\');'">删除</a>
                            </td>
                        </tr>
                    </table>
                </div>
                <div class="list-page" th:utext="${pageHtml}">
                </div>
            </div>
        </div>
    </div>
    <div th:include="admin/common/common"></div>
    <script type="text/javascript" th:src="@{/js/web/hotel/hotelInfo.js?v=1.4}"></script>
</body>
</html>